Generate New Private Key
The /files/tls/<id>/privateKey/generate URL provides the ability to generate a new private key. The generation occurs on the device and therefore this method is considered to be more secure than the uploading of the private key as described in Private Key.
URL
/api/v1/files/tls/<id>/privateKey/generate
HTTP Method
POST
Supported Request JSON Attributes
Parameter |
Type |
Value |
Description |
|||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
size |
Number |
|
Size of the generated private key. Default = 1024. |
HTTP Responses
■ | 200 OK |
■ | 400 Bad request – provided parameters or values are incorrect |
■ | 409 Conflict – private key can’t be generated due to current device state (e.g. redundant board is synchronizing) |
Example
■ | Request: |
POST /api/v1/files/tls/2/privateKey/generate HTTP/1.1 Host: 10.4.219.229 Content-Type: application/json { "size": 2048 }
■ | Request: |
HTTP/1.1 200 OK Content-Type: application/json { "description": "Private key was successfully generated" }